<template>
  <div id="app">
    <van-nav-bar title="黑马头条" :fixed="true" class="title"/>

    <!-- 路由占位符 -->
    <router-view></router-view>

  <van-tabbar v-model="active" route>
      <van-tabbar-item name="home" icon="home-o" replayce to="/home">首页</van-tabbar-item>
      <van-tabbar-item name="friends" icon="friends-o" to="/user">我的</van-tabbar-item>
  </van-tabbar>

  </div>
</template>
<script>
import { ref } from 'vue';
export default {
   setup() {
    const active = ref(0);
    return { active };
  },
}
</script>
<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  padding-top: 46px;
  padding-bottom: 50px;
  .van-nav-bar__title{
    color: white;
  }
  .title{
    background-color: #007bff;
  }
}

</style>
